using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class so_itemOnhandFastMap : EntityTypeConfiguration<so_itemOnhandFast>
    {
        public so_itemOnhandFastMap()
        {
            // Primary Key
            this.HasKey(t => t.DimFIELDS);

            // Properties
            this.Property(t => t.Description)
                .HasMaxLength(75);

            this.Property(t => t.item)
                .HasMaxLength(10);

            this.Property(t => t.DimFIELDS)
                .IsRequired()
                .HasMaxLength(6);

            // Table & Column Mappings
            this.ToTable("so_itemOnhandFast");
            this.Property(t => t.Description).HasColumnName("Description");
            this.Property(t => t.item).HasColumnName("item");
            this.Property(t => t.on_hand).HasColumnName("on_hand");
            this.Property(t => t.Opening_quantity).HasColumnName("Opening_quantity");
            this.Property(t => t.DimFIELDS).HasColumnName("DimFIELDS");
        }
    }
}
